/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.*;
import DTO.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.List;
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.regex.*;

import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import javax.swing.JFileChooser;

import java.util.Date;

import java.io.File;
import java.awt.Desktop;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.swing.JRViewer;

/**
 *
 * @author Luis Olave 10
 */
public class IngresoGarantiaCdp extends javax.swing.JFrame {
    
    usuarioDTO user;
    garantiasDAO reg = new garantiasDAO();

    /**
     * Creates new form IngresoGarantiaCdp
     */
    public IngresoGarantiaCdp(usuarioDTO user) {
        this.user = user;
        initComponents();
        cargarItemsComboBoxSucursal();
        cargarItemsComboBoxMoneda();
        cargarItemsComboBoxTipoGarantia();
        txtFechaCreacion.setText(DAO.Fechas.FechaSistema());
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }
    
    private void cargarItemsComboBoxSucursal() {
        List<sucursalDTO> ListaSucursal = CCSucursal.listarItemSucursal();
        if (ListaSucursal != null) {
            int size = ListaSucursal.size();
            for (int i = 0; i < size; i++) {
                this.cmbSucursalCDP.addItem(ListaSucursal.get(i));
            }
        }
    }
    
    private void cargarItemsComboBoxMoneda() {
        List<monedaDTO> ListaMoneda = CCMoneda.listarItemMoneda();
        if (ListaMoneda != null) {
            int size = ListaMoneda.size();
            for (int i = 0; i < size; i++) {
                this.cmbMonedaCDP.addItem(ListaMoneda.get(i));
            }
        }
    }
    
    private void cargarItemsComboBoxTipoGarantia() {
        List<tipoGarantiaDTO> ListaTipoGarantia = CCTipoGarantia.listarItemTipoGarantia();
        if (ListaTipoGarantia != null) {
            int size = ListaTipoGarantia.size();
            for (int i = 0; i < size; i++) {
                this.cmbTipoGtiaCDP.addItem(ListaTipoGarantia.get(i));
            }
        }
    }
//    private void cargarTxtArea(){
//    
//        
//        String cadena = "Operación mediante el cual el cliente obtiene crédito del banco dejando como garantía mercadería a ser utilizada en el futuro";
//        
//        if(txtRutGaraCDP.getText().length()>0){
//        txtDescripcion.setText(cadena);
//        }
//        else
//        {
//        
//        }
//    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        btnMenuPrincipal = new javax.swing.JButton();
        pnlDatosPersoGara = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        lblRutGara = new javax.swing.JLabel();
        lblApellidoPater = new javax.swing.JLabel();
        lblApellidoMater = new javax.swing.JLabel();
        lblNombre = new javax.swing.JLabel();
        lblFechNac = new javax.swing.JLabel();
        lblSexo = new javax.swing.JLabel();
        txtNombreCDP = new javax.swing.JTextField();
        txtApellidoMaternoCDP = new javax.swing.JTextField();
        txtApellidoPaternoCDP = new javax.swing.JTextField();
        txtRutGaraCDP = new javax.swing.JTextField();
        txtSexo = new javax.swing.JTextField();
        txtFechNac = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        lblCalleAvenida = new javax.swing.JLabel();
        lblNumero = new javax.swing.JLabel();
        lblDepto = new javax.swing.JLabel();
        lblRegion = new javax.swing.JLabel();
        lblComuna = new javax.swing.JLabel();
        lblTelParticular = new javax.swing.JLabel();
        lblTelMovil = new javax.swing.JLabel();
        txtCalleAvenidaCDP = new javax.swing.JTextField();
        txtNumeroCalleCDP = new javax.swing.JTextField();
        txtDeptoCDP = new javax.swing.JTextField();
        txtRegionCDP = new javax.swing.JTextField();
        txtComunaCDP = new javax.swing.JTextField();
        txtTelParticularCDP = new javax.swing.JTextField();
        txtTelMovilCDP = new javax.swing.JTextField();
        pnlIngreseRutGarante = new javax.swing.JPanel();
        lblRut = new javax.swing.JLabel();
        txtRutBuscarCDP = new javax.swing.JTextField();
        btnBuscarCDP = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        pnlDescripGarantia = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtOtroComentario = new javax.swing.JTextArea();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtDescripcion = new javax.swing.JTextArea();
        lblDescripcion = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        cmbSucursalCDP = new javax.swing.JComboBox();
        jLabel13 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        cmbMonedaCDP = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        txtNumCDP = new javax.swing.JTextField();
        jcFechUltDebCDP = new com.toedter.calendar.JDateChooser();
        jcUltTasCDP = new com.toedter.calendar.JDateChooser();
        jcFechaModCDP = new com.toedter.calendar.JDateChooser();
        txtFechaCreacion = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        cmbTipoGtiaCDP = new javax.swing.JComboBox();
        jcFechExtCDP = new com.toedter.calendar.JDateChooser();
        jcUltRevalCDP = new com.toedter.calendar.JDateChooser();
        jcFechUltCredCDP = new com.toedter.calendar.JDateChooser();
        jPanel10 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        txtArchivoCDP = new javax.swing.JTextField();
        btnExaminarCDP = new javax.swing.JButton();
        btnAdjuntarCDP = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        lblArchivo1 = new javax.swing.JLabel();
        txtMontoInicial = new javax.swing.JTextField();
        btnMenuPCDP = new javax.swing.JButton();
        btnGrabarCDP = new javax.swing.JButton();
        btnExpoCdp = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbSalidaImprimirCDP = new javax.swing.JTable();
        jPanel13 = new javax.swing.JPanel();
        txtBuscarNumeroCDP = new javax.swing.JTextField();
        btnBuscarIngresoGarantiaCDP = new javax.swing.JButton();
        btnImprimirIngresoGarantiaCDP = new javax.swing.JButton();
        btnMenuPrincipalCDP = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("INGRESO GARANTÍA CDP");
        setResizable(false);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        jLabel1.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel1.setText("INGRESO GARANTÍA CDP");

        jTabbedPane1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        btnMenuPrincipal.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPrincipal.setText("MENÚ PRINCIPAL");
        btnMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalActionPerformed(evt);
            }
        });

        pnlDatosPersoGara.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DATOS PERSONALES GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblRutGara.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblRutGara.setText("RUT");

        lblApellidoPater.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblApellidoPater.setText("APELLIDO PATERNO");

        lblApellidoMater.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblApellidoMater.setText("APELLIDO MATERNO");

        lblNombre.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblNombre.setText("NOMBRE");

        lblFechNac.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblFechNac.setText("FECHA NACIMIENTO");

        lblSexo.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblSexo.setText("SEXO");

        txtNombreCDP.setEditable(false);
        txtNombreCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtNombreCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNombreCDP.setEnabled(false);

        txtApellidoMaternoCDP.setEditable(false);
        txtApellidoMaternoCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtApellidoMaternoCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellidoMaternoCDP.setEnabled(false);

        txtApellidoPaternoCDP.setEditable(false);
        txtApellidoPaternoCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtApellidoPaternoCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtApellidoPaternoCDP.setEnabled(false);

        txtRutGaraCDP.setEditable(false);
        txtRutGaraCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtRutGaraCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRutGaraCDP.setEnabled(false);

        txtSexo.setEditable(false);
        txtSexo.setBackground(new java.awt.Color(255, 255, 102));
        txtSexo.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtSexo.setEnabled(false);

        txtFechNac.setEditable(false);
        txtFechNac.setBackground(new java.awt.Color(255, 255, 102));
        txtFechNac.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtFechNac.setEnabled(false);

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblApellidoMater)
                            .addComponent(lblApellidoPater)
                            .addComponent(lblRutGara))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtApellidoMaternoCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                            .addComponent(txtApellidoPaternoCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                            .addComponent(txtRutGaraCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblFechNac)
                            .addComponent(lblNombre)
                            .addComponent(lblSexo))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNombreCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)
                            .addComponent(txtSexo, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)
                            .addComponent(txtFechNac, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblRutGara)
                    .addComponent(txtRutGaraCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblApellidoPater)
                    .addComponent(txtApellidoPaternoCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblApellidoMater)
                    .addComponent(txtApellidoMaternoCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNombre)
                    .addComponent(txtNombreCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblFechNac)
                    .addComponent(txtFechNac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblSexo)
                    .addComponent(txtSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(37, Short.MAX_VALUE))
        );

        lblCalleAvenida.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblCalleAvenida.setText("CALLE / AVENIDA");

        lblNumero.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblNumero.setText("NÚMERO");

        lblDepto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDepto.setText("DEPTO.");

        lblRegion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblRegion.setText("REGIÓN");

        lblComuna.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblComuna.setText("COMUNA");

        lblTelParticular.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblTelParticular.setText("TEL. PARTICULAR");

        lblTelMovil.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblTelMovil.setText("TEL. MOVIL");

        txtCalleAvenidaCDP.setEditable(false);
        txtCalleAvenidaCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtCalleAvenidaCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtCalleAvenidaCDP.setEnabled(false);

        txtNumeroCalleCDP.setEditable(false);
        txtNumeroCalleCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtNumeroCalleCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtNumeroCalleCDP.setEnabled(false);

        txtDeptoCDP.setEditable(false);
        txtDeptoCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtDeptoCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtDeptoCDP.setEnabled(false);

        txtRegionCDP.setEditable(false);
        txtRegionCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtRegionCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtRegionCDP.setEnabled(false);

        txtComunaCDP.setEditable(false);
        txtComunaCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtComunaCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtComunaCDP.setEnabled(false);

        txtTelParticularCDP.setEditable(false);
        txtTelParticularCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtTelParticularCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTelParticularCDP.setEnabled(false);

        txtTelMovilCDP.setEditable(false);
        txtTelMovilCDP.setBackground(new java.awt.Color(255, 255, 102));
        txtTelMovilCDP.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtTelMovilCDP.setEnabled(false);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblCalleAvenida)
                    .addComponent(lblRegion)
                    .addComponent(lblComuna)
                    .addComponent(lblTelParticular)
                    .addComponent(lblTelMovil)
                    .addComponent(lblDepto))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(txtTelParticularCDP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)
                    .addComponent(txtComunaCDP, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRegionCDP, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtDeptoCDP, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtCalleAvenidaCDP, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtTelMovilCDP))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblNumero)
                .addGap(18, 18, 18)
                .addComponent(txtNumeroCalleCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCalleAvenida)
                    .addComponent(txtCalleAvenidaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNumero)
                    .addComponent(txtNumeroCalleCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtDeptoCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblDepto))
                .addGap(6, 6, 6)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtRegionCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblRegion))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtComunaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblComuna))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtTelParticularCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelParticular))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtTelMovilCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblTelMovil))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlDatosPersoGaraLayout = new javax.swing.GroupLayout(pnlDatosPersoGara);
        pnlDatosPersoGara.setLayout(pnlDatosPersoGaraLayout);
        pnlDatosPersoGaraLayout.setHorizontalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDatosPersoGaraLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlDatosPersoGaraLayout.setVerticalGroup(
            pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDatosPersoGaraLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDatosPersoGaraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        pnlIngreseRutGarante.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE RUT GARANTE", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblRut.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblRut.setText("RUT");

        btnBuscarCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarCDP.setText("BUSCAR");
        btnBuscarCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIngreseRutGaranteLayout = new javax.swing.GroupLayout(pnlIngreseRutGarante);
        pnlIngreseRutGarante.setLayout(pnlIngreseRutGaranteLayout);
        pnlIngreseRutGaranteLayout.setHorizontalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblRut)
                .addGap(18, 18, 18)
                .addGroup(pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtRutBuscarCDP)
                    .addComponent(btnBuscarCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
                .addContainerGap(52, Short.MAX_VALUE))
        );
        pnlIngreseRutGaranteLayout.setVerticalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblRut)
                    .addComponent(txtRutBuscarCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscarCDP)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(299, 299, 299)
                                .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(btnMenuPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 274, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(pnlDatosPersoGara, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnMenuPrincipal)
                .addContainerGap(81, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("INFO. GARANTE", jPanel1);

        pnlDescripGarantia.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DESCRIPCIÓN GARANTIA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        txtOtroComentario.setColumns(20);
        txtOtroComentario.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtOtroComentario.setRows(5);
        txtOtroComentario.setText("OTRO COMENTARIO ...");
        txtOtroComentario.setToolTipText("");
        jScrollPane3.setViewportView(txtOtroComentario);

        txtDescripcion.setBackground(new java.awt.Color(255, 255, 102));
        txtDescripcion.setColumns(20);
        txtDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtDescripcion.setRows(5);
        txtDescripcion.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        jScrollPane4.setViewportView(txtDescripcion);

        lblDescripcion.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblDescripcion.setText("DESCRIPCIÓN");

        javax.swing.GroupLayout pnlDescripGarantiaLayout = new javax.swing.GroupLayout(pnlDescripGarantia);
        pnlDescripGarantia.setLayout(pnlDescripGarantiaLayout);
        pnlDescripGarantiaLayout.setHorizontalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlDescripGarantiaLayout.createSequentialGroup()
                .addGap(70, 70, 70)
                .addComponent(lblDescripcion)
                .addGap(18, 18, 18)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 586, Short.MAX_VALUE)
                    .addComponent(jScrollPane3))
                .addContainerGap())
        );
        pnlDescripGarantiaLayout.setVerticalGroup(
            pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlDescripGarantiaLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlDescripGarantiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblDescripcion)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(250, 250, 250))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlDescripGarantia, javax.swing.GroupLayout.PREFERRED_SIZE, 359, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(115, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("DESCRIP. GARANTÍA", jPanel2);

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CREACIÓN GARANTÍA CDP", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel4.setText("SUCURSAL");

        jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel5.setText("FECHA CREACIÓN");

        jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel6.setText("FECHA ÚLT. DEBITO");

        cmbSucursalCDP.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbSucursalCDP.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel13.setText("FECHA MODIFICA.");

        jLabel12.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel12.setText("FECHA ÚLT. TASACIÓN");

        jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel11.setText("MONEDA");

        cmbMonedaCDP.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbMonedaCDP.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel14.setText("NÚMERO CDP");

        txtNumCDP.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtNumCDPKeyReleased(evt);
            }
        });

        txtFechaCreacion.setEditable(false);
        txtFechaCreacion.setBackground(new java.awt.Color(255, 255, 0));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13)
                    .addComponent(jLabel11)
                    .addComponent(jLabel14)
                    .addComponent(jLabel6)
                    .addComponent(jLabel5)
                    .addComponent(jLabel4))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jcFechUltDebCDP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(cmbMonedaCDP, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtNumCDP)
                    .addComponent(jcUltTasCDP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcFechaModCDP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtFechaCreacion)
                    .addComponent(cmbSucursalCDP, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(cmbSucursalCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel6))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(txtFechaCreacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jcFechUltDebCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel11)
                    .addComponent(cmbMonedaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel12)
                    .addComponent(jcUltTasCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcFechaModCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(txtNumCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel7.setText("TIPO GARANTÍA");

        jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel8.setText("FECHA EXTINCIÓN");

        jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel9.setText("FECHA ÚLT. REVAL.");

        jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel10.setText("FECHA ÚLT. CRÉDITO");

        cmbTipoGtiaCDP.setFont(new java.awt.Font("Century Gothic", 0, 10)); // NOI18N
        cmbTipoGtiaCDP.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10)
                    .addComponent(jLabel9)
                    .addComponent(jLabel8)
                    .addComponent(jLabel7))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jcFechExtCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
                    .addComponent(jcUltRevalCDP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcFechUltCredCDP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cmbTipoGtiaCDP, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(cmbTipoGtiaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel8)
                    .addComponent(jcFechExtCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jcUltRevalCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel9)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcFechUltCredCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ADJUNTAR ARCHIVO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel16.setText("ARCHIVO");

        txtArchivoCDP.setEditable(false);

        btnExaminarCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnExaminarCDP.setText("EXAMINAR");
        btnExaminarCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExaminarCDPActionPerformed(evt);
            }
        });

        btnAdjuntarCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnAdjuntarCDP.setText("ADJUNTAR");
        btnAdjuntarCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAdjuntarCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel16)
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(btnExaminarCDP)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnAdjuntarCDP))
                    .addComponent(txtArchivoCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(txtArchivoCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnExaminarCDP)
                    .addComponent(btnAdjuntarCDP))
                .addContainerGap())
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "GARANTÍA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        lblArchivo1.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        lblArchivo1.setText("MONTO INICIAL");

        txtMontoInicial.setBackground(new java.awt.Color(255, 255, 102));
        txtMontoInicial.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        txtMontoInicial.setDisabledTextColor(new java.awt.Color(0, 0, 204));
        txtMontoInicial.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtMontoInicialActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblArchivo1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(30, 30, 30)
                .addComponent(txtMontoInicial, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblArchivo1)
                    .addComponent(txtMontoInicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(42, 42, 42))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 113, Short.MAX_VALUE)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGap(15, 15, 15))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        btnMenuPCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnMenuPCDP.setText("MENÚ PRINCIPAL >>");
        btnMenuPCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPCDPActionPerformed(evt);
            }
        });

        btnGrabarCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnGrabarCDP.setText("GRABAR");
        btnGrabarCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGrabarCDPActionPerformed(evt);
            }
        });

        btnExpoCdp.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnExpoCdp.setText("EXPORTAR");
        btnExpoCdp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExpoCdpActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(btnExpoCdp, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnGrabarCDP)
                        .addGap(182, 182, 182)
                        .addComponent(btnMenuPCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnMenuPCDP)
                    .addComponent(btnGrabarCDP)
                    .addComponent(btnExpoCdp))
                .addContainerGap(92, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("INGRESO GARANTÍA CDP", jPanel3);

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "ÁREA IMPRESIÓN", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        tbSalidaImprimirCDP.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        tbSalidaImprimirCDP.setEnabled(false);
        jScrollPane1.setViewportView(tbSalidaImprimirCDP);

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 287, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE NÚMERO CDP", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarIngresoGarantiaCDP.setText("BUSCAR");
        btnBuscarIngresoGarantiaCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarIngresoGarantiaCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGap(46, 46, 46)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btnBuscarIngresoGarantiaCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE)
                    .addComponent(txtBuscarNumeroCDP))
                .addContainerGap(41, Short.MAX_VALUE))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtBuscarNumeroCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnBuscarIngresoGarantiaCDP))
        );

        btnImprimirIngresoGarantiaCDP.setText("IMPRIMIR");
        btnImprimirIngresoGarantiaCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirIngresoGarantiaCDPActionPerformed(evt);
            }
        });

        btnMenuPrincipalCDP.setText("MENÚ PRINCIPAL");
        btnMenuPrincipalCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMenuPrincipalCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(296, 296, 296))))
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(332, 332, 332)
                .addComponent(btnImprimirIngresoGarantiaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 184, Short.MAX_VALUE)
                .addComponent(btnMenuPrincipalCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnImprimirIngresoGarantiaCDP)
                    .addComponent(btnMenuPrincipalCDP))
                .addGap(19, 19, 19))
        );

        jTabbedPane1.addTab("IMPRIMIR", jPanel9);

        jLabel3.setText("MENÚ PRINCIPAL\\INGRESO GARANTÍA CDP");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(118, 118, 118)
                        .addComponent(jLabel1))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel3)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1))
        );

        setSize(new java.awt.Dimension(816, 638));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnBuscarCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarCDPActionPerformed
        try {
            if(ValidarRutDAO.validarRut(this.txtRutBuscarCDP.getText().toUpperCase()))
           {
          javax.swing.JOptionPane.showMessageDialog(this, "Rut valido");
        String buscarPorRut = txtRutBuscarCDP.getText().toString().trim();
        if(txtRutBuscarCDP.getText().length()>0){        
        garanteDTO garante = reg.buscarPorRut(this.txtRutBuscarCDP.getText().trim());
        if (reg.validar_rut(buscarPorRut) == true){
        this.txtRutGaraCDP.setText(garante.getRut_gara());
        this.txtApellidoPaternoCDP.setText(garante.getApell_paterno_gara());
        this.txtApellidoMaternoCDP.setText(garante.getApell_materno_gara());
        this.txtNombreCDP.setText(garante.getNombre_gara());
        this.txtFechNac.setText(garante.getFecha_nac_gara());
        this.txtSexo.setText(garante.getSexo_gara());
        this.txtCalleAvenidaCDP.setText(garante.getCalle_gara());
        this.txtNumeroCalleCDP.setText(String.valueOf(garante.getNum_gara()));
        this.txtDeptoCDP.setText(garante.getDepto_gara());
        this.txtRegionCDP.setText(garante.getReg_gara());
        this.txtComunaCDP.setText(garante.getComu_gara());
        this.txtTelParticularCDP.setText(String.valueOf(garante.getTel_part_gara()));
        this.txtTelMovilCDP.setText(String.valueOf(garante.getTel_mov_gara()));
        
//        cargarTxtArea();
          }
         else
        { 
         javax.swing.JOptionPane.showMessageDialog(this, "Rut Gatarantía CDP No Existente");
         
        this.txtRutGaraCDP.setText(null);
        this.txtApellidoPaternoCDP.setText(null);
        this.txtApellidoMaternoCDP.setText(null);
        this.txtNombreCDP.setText(null);
        this.txtFechNac.setText(null);
        this.txtSexo.setText(null);
        this.txtCalleAvenidaCDP.setText(null);
        this.txtNumeroCalleCDP.setText(null);
        this.txtDeptoCDP.setText(null);
        this.txtRegionCDP.setText(null);
        this.txtComunaCDP.setText(null);
        this.txtTelParticularCDP.setText(null);
        this.txtTelMovilCDP.setText(null);
        this.txtDescripcion.setText(null);
        }
        }
        else
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Rut");
        }
        }else
            {
                javax.swing.JOptionPane.showMessageDialog(this, "Rut invalido");
            }
            }catch (Exception e) {
            e.getMessage();
            javax.swing.JOptionPane.showMessageDialog(this, "Rut No Existente");
        }
    }//GEN-LAST:event_btnBuscarCDPActionPerformed
    
    private void btnMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        IngresoGarantiaCdp.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalActionPerformed
            
    private void btnGrabarCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGrabarCDPActionPerformed
        garantiaCdpOtrosDTO garaCdp = new garantiaCdpOtrosDTO();
        String numero = txtNumCDP.getText();
        
        if(txtRutBuscarCDP.getText().length()>0){
            if(reg.validar_num_cdp(numero) != true )
        {
        if(this.cmbSucursalCDP.getSelectedItem().equals("Seleccione"))
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese una Sucursal");
        }
        else if(this.cmbMonedaCDP.getSelectedItem().equals("Seleccione"))
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese un Tipo de Moneda");
        }
        else if(this.cmbTipoGtiaCDP.getSelectedItem().equals("Seleccione"))
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese un Tipo de Garantia");
        }
//        else if(this.txtNumero1.getText().length()  == 0)
//        {
//            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese un Numero");
//        }
        else if(this.txtFechaCreacion.getText().length() == 0)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese una Fecha de Creacion");
        }
        else if(this.jcFechExtCDP.getDate() == null)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese una Fecha de Extincion");
        }
        else if(this.jcFechUltCredCDP.getDate() == null)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese una Ultima Fecha de Creacion");
        }
        else if(this.jcFechUltDebCDP.getDate() == null)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese una Fecha Ultimo Debito");
        }
        else if(this.jcFechaModCDP.getDate() == null)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese una Fecha de Modificacion");
        }
        else if(this.txtNumCDP.getText().length() == 0)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Número CDP");
        }
        else if(this.jcUltRevalCDP.getDate() == null)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Ultima Reavaluo");
        }
        else if(this.jcUltTasCDP.getDate() == null)
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Tasacion");
        }else if (this.txtMontoInicial.getText().length() == 0) // validamos campos vacios
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Monto");
        }        
       else {
            garaCdp.setRut_gara_cdp(this.txtRutGaraCDP.getText().trim());
            garaCdp.setApell_paterno_cdp(this.txtApellidoPaternoCDP.getText().trim());
            garaCdp.setApell_materno_cdp(this.txtApellidoMaternoCDP.getText().trim());
            garaCdp.setNombre_cdp(this.txtNombreCDP.getText().trim());
            garaCdp.setFech_nac_cdp(this.txtFechNac.getText());
            garaCdp.setSexo_cdp(this.txtSexo.getText().trim());
            garaCdp.setCalle_cdp(this.txtCalleAvenidaCDP.getText().trim());
            garaCdp.setNumero_calle_cdp(Integer.parseInt(this.txtNumeroCalleCDP.getText().trim()));
            garaCdp.setDepto_cdp(this.txtDeptoCDP.getText().trim());
            garaCdp.setReg_cdp(this.txtRegionCDP.getText().trim());
            garaCdp.setComu_cdp(this.txtComunaCDP.getText().trim());       
            garaCdp.setTel_part_cdp(Integer.parseInt(this.txtTelParticularCDP.getText().trim()));
            garaCdp.setTel_mov_cdp(Integer.parseInt(this.txtTelMovilCDP.getText().trim()));
            garaCdp.setSucu_cdp(this.cmbSucursalCDP.getSelectedItem().toString());
            Date fechaCreacion;
            try {
                fechaCreacion = (new SimpleDateFormat("dd/MM/yyyy").parse(txtFechaCreacion.getText()));
                garaCdp.setFech_crea_cdp(fechaCreacion); 
            } catch (ParseException ex) {
                Logger.getLogger(IngresoGarantiaCdp.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            garaCdp.setFech_ult_deb_cdp(new SimpleDateFormat("dd/MM/yyyy").format(this.jcFechUltDebCDP.getDate()));
            garaCdp.setNom_moneda_cdp(this.cmbMonedaCDP.getSelectedItem().toString());
            garaCdp.setFech_ult_tasa_cdp(new SimpleDateFormat("dd/MM/yyyy").format(this.jcUltTasCDP.getDate()));            
            garaCdp.setFech_modif_cdp(new SimpleDateFormat("dd/MM/yyyy").format(this.jcFechaModCDP.getDate()));
            garaCdp.setNum_cdp(Integer.parseInt(this.txtNumCDP.getText().trim()));
            garaCdp.setTipo_garantia_cdp(this.cmbTipoGtiaCDP.getSelectedItem().toString());
            garaCdp.setFech_extin_cdp(new Date(this.jcFechExtCDP.getDate().getTime()));            
            garaCdp.setFech_ult_reval_cdp(new SimpleDateFormat("dd/MM/yyyy").format(this.jcUltRevalCDP.getDate()));            
            garaCdp.setFech_ult_cred_cdp(new SimpleDateFormat("dd/MM/yyyy").format(this.jcFechUltCredCDP.getDate()));
            garaCdp.setNom_garantia_cdp("cdp");
            garaCdp.setDescrip_cdp(this.txtDescripcion.getText().trim());
            garaCdp.setComent_cdp(this.txtOtroComentario.getText().trim());
            garaCdp.setAdjuntar_cdp(this.txtArchivoCDP.getText().trim());
            
            garaCdp.setMonto_inicial(Integer.parseInt(this.txtMontoInicial.getText().trim()));
            
            reg.creacionGarantiaCDP(garaCdp, user);
            javax.swing.JOptionPane.showMessageDialog(this, "Garantia CDP almacenada con Exito");
        } 
          }
     else
     {
         javax.swing.JOptionPane.showMessageDialog(this, "Número de cdp ya existe");
     }
        }
        else{
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Rut en Info Garante");
        }
        limpiar();
        
    }//GEN-LAST:event_btnGrabarCDPActionPerformed
     
    
    
    private void btnMenuPCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPCDPActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        IngresoGarantiaCdp.this.dispose();
    }//GEN-LAST:event_btnMenuPCDPActionPerformed

    private void txtNumCDPKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtNumCDPKeyReleased
        if (!this.txtNumCDP.getText().matches("[ 0-9]*"))
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtNumCDP.setText("");
        }
    }//GEN-LAST:event_txtNumCDPKeyReleased

    private void btnExaminarCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExaminarCDPActionPerformed
         JFileChooser filechooser = new JFileChooser();
        int opcion = filechooser.showOpenDialog(this);
        if (opcion==JFileChooser.APPROVE_OPTION){
            txtArchivoCDP.setText(filechooser.getSelectedFile().getPath());// TODO add your handling code here:
    }                                           
    }//GEN-LAST:event_btnExaminarCDPActionPerformed

    private void btnExpoCdpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExpoCdpActionPerformed
        String rut=this.txtRutBuscarCDP.getText().trim();
        reg.exportarGarantiaCDP(rut);
        javax.swing.JOptionPane.showMessageDialog(this, "Exportacion Realizada con exito");
        File file=new File ("C:/export_garantia_CDP.csv");
        try{
            Desktop.getDesktop().open(file);
        }catch(IOException ex){
            Logger.getLogger(IngresoGarantiaCdp.class.getName()).log(Level.SEVERE,null,ex);
            
        }  
    }//GEN-LAST:event_btnExpoCdpActionPerformed

    private void txtMontoInicialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtMontoInicialActionPerformed
         if (!this.txtMontoInicial.getText().matches("[ 0-9]*")) // expresiones regulares para validar
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese solo números");
            this.txtMontoInicial.setText("");
        }
    }//GEN-LAST:event_txtMontoInicialActionPerformed

    private void btnAdjuntarCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAdjuntarCDPActionPerformed
        if(!this.txtArchivoCDP.getText().equals("")){
        garantiaCdpOtrosDTO garaCdp = new garantiaCdpOtrosDTO();
        garaCdp.setAdjuntar_cdp(this.txtArchivoCDP.getText().trim());
        javax.swing.JOptionPane.showMessageDialog(this, "Archivo guardado");
        }else{
        javax.swing.JOptionPane.showMessageDialog(this, "Adjunte archivo");
        }
    }//GEN-LAST:event_btnAdjuntarCDPActionPerformed

    private void btnBuscarIngresoGarantiaCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarIngresoGarantiaCDPActionPerformed
         try
       {
           ArrayList<garantiaCdpOtrosDTO> salida = reg.ListarPorCdp(Integer.parseInt(this.txtBuscarNumeroCDP.getText().trim()));
           if(salida.isEmpty())
           {
              
               this.txtBuscarNumeroCDP.setText(null);
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirCDP.getModel();
               modelo.setNumRows(0);
               javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           }
           else
           {
               
               DefaultTableModel modelo = (DefaultTableModel)this.tbSalidaImprimirCDP.getModel();
               modelo.setColumnCount(0);
               
               if(modelo.getColumnCount() < 1)
                {
                    
                    Object[] arr1 ={"Rut: ","Nombre: ", "Dirección: ", "Garantía: ", "Número identificatorio CDP: ",
                        "Número de folio: ", "Monto incial: ", "Creación de la garantía: ", "Sucursal: ",
                        "Fecha último debito: ","Moneda: ","Fecha última tasación","Tipo garantía: ","Fecha vencimiento: ",
                        "Fecha último revaluo: ","Fecha último credito: ", 
                        "Usuario: " };
                    modelo.addColumn("Concepto", arr1);
                    
                    for(garantiaCdpOtrosDTO c: salida)
                {
                    Object[] arr2 ={
                                   c.getRut_gara_cdp(),
                                   c.getNombre_cdp() + "  " + c.getApell_paterno_cdp() + "  " + c.getApell_materno_cdp(),
                                   c.getCalle_cdp() + "  " + c.getNumero_calle_cdp(),
                                   c.getNom_garantia_cdp(),
                                   c.getNum_cdp(),
                                   c.getFolio_cdp(),
                                   c.getMonto_inicial(),
                                   c.getFech_crea_cdp(),
                                   c.getSucu_cdp(),
                                   c.getFech_ult_deb_cdp(),
                                   c.getNom_moneda_cdp(),
                                   c.getFech_ult_tasa_cdp(),
                                   c.getTipo_garantia_cdp(),
                                   c.getFech_extin_cdp(),
                                   c.getFech_ult_reval_cdp(),
                                   c.getFech_ult_cred_cdp(),
                                   c.getNombre_usuario()
                    };
                     
                    modelo.addColumn("Contenido",arr2);    
                }
                    
                    Object[] arr3 = {" "," "," "," "," "," "," "," "," "," ",
                                     " "," "," "," "," "," "," "};
                    modelo.addColumn("Observaciones",arr3);
                    
                }
    
           }
       }
       catch(Exception e)
       {
           e.getMessage();
       }
    }//GEN-LAST:event_btnBuscarIngresoGarantiaCDPActionPerformed

    private void btnImprimirIngresoGarantiaCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirIngresoGarantiaCDPActionPerformed
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ComprobanteGeneralDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< tbSalidaImprimirCDP.getRowCount(); fila++)
        {
            
           tipo = new ComprobanteGeneralDTO(String.valueOf(tbSalidaImprimirCDP.getValueAt(fila, 0)),
                    " " + String.valueOf(tbSalidaImprimirCDP.getValueAt(fila, 1)), " " + String.valueOf(tbSalidaImprimirCDP.getValueAt(fila, 2))  + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ComprobanteGeneralGarantias.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            map.put("subtitulo", "Comprobante Ingreso CDP");
            map.put("timbre", "Timbre");
            map.put("fechaUsuario","Fecha");
            map.put("firma","Firma");

            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(IngresoGarantiaCdp.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnImprimirIngresoGarantiaCDPActionPerformed

    private void btnMenuPrincipalCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMenuPrincipalCDPActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        IngresoGarantiaCdp.this.dispose();
    }//GEN-LAST:event_btnMenuPrincipalCDPActionPerformed
    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//IngresoGarantiaCdp
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(IngresoGarantiaCdp2.class.getName()).log(java.utIngresoGarantiaCdpVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(IngresoGarantiaCdp2.class.getName()).log(java.utIngresoGarantiaCdpVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(IngresoGarantiaCdp2.class.getName()).log(java.util.logging.Level.SEVEIngresoGarantiaCdp      } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(IngresoGarantiaCdp2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the formIngresoGarantiaCdp      java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new IngresoGarantiaCdp2().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdjuntarCDP;
    private javax.swing.JButton btnBuscarCDP;
    private javax.swing.JButton btnBuscarIngresoGarantiaCDP;
    private javax.swing.JButton btnExaminarCDP;
    private javax.swing.JButton btnExpoCdp;
    private javax.swing.JButton btnGrabarCDP;
    private javax.swing.JButton btnImprimirIngresoGarantiaCDP;
    private javax.swing.JButton btnMenuPCDP;
    private javax.swing.JButton btnMenuPrincipal;
    private javax.swing.JButton btnMenuPrincipalCDP;
    private javax.swing.JComboBox cmbMonedaCDP;
    private javax.swing.JComboBox cmbSucursalCDP;
    private javax.swing.JComboBox cmbTipoGtiaCDP;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private com.toedter.calendar.JDateChooser jcFechExtCDP;
    private com.toedter.calendar.JDateChooser jcFechUltCredCDP;
    private com.toedter.calendar.JDateChooser jcFechUltDebCDP;
    private com.toedter.calendar.JDateChooser jcFechaModCDP;
    private com.toedter.calendar.JDateChooser jcUltRevalCDP;
    private com.toedter.calendar.JDateChooser jcUltTasCDP;
    private javax.swing.JLabel lblApellidoMater;
    private javax.swing.JLabel lblApellidoPater;
    private javax.swing.JLabel lblArchivo1;
    private javax.swing.JLabel lblCalleAvenida;
    private javax.swing.JLabel lblComuna;
    private javax.swing.JLabel lblDepto;
    private javax.swing.JLabel lblDescripcion;
    private javax.swing.JLabel lblFechNac;
    private javax.swing.JLabel lblNombre;
    private javax.swing.JLabel lblNumero;
    private javax.swing.JLabel lblRegion;
    private javax.swing.JLabel lblRut;
    private javax.swing.JLabel lblRutGara;
    private javax.swing.JLabel lblSexo;
    private javax.swing.JLabel lblTelMovil;
    private javax.swing.JLabel lblTelParticular;
    private javax.swing.JPanel pnlDatosPersoGara;
    private javax.swing.JPanel pnlDescripGarantia;
    private javax.swing.JPanel pnlIngreseRutGarante;
    private javax.swing.JTable tbSalidaImprimirCDP;
    private javax.swing.JTextField txtApellidoMaternoCDP;
    private javax.swing.JTextField txtApellidoPaternoCDP;
    private javax.swing.JTextField txtArchivoCDP;
    private javax.swing.JTextField txtBuscarNumeroCDP;
    private javax.swing.JTextField txtCalleAvenidaCDP;
    private javax.swing.JTextField txtComunaCDP;
    private javax.swing.JTextField txtDeptoCDP;
    private javax.swing.JTextArea txtDescripcion;
    private javax.swing.JTextField txtFechNac;
    private javax.swing.JTextField txtFechaCreacion;
    private javax.swing.JTextField txtMontoInicial;
    private javax.swing.JTextField txtNombreCDP;
    private javax.swing.JTextField txtNumCDP;
    private javax.swing.JTextField txtNumeroCalleCDP;
    private javax.swing.JTextArea txtOtroComentario;
    private javax.swing.JTextField txtRegionCDP;
    private javax.swing.JTextField txtRutBuscarCDP;
    private javax.swing.JTextField txtRutGaraCDP;
    private javax.swing.JTextField txtSexo;
    private javax.swing.JTextField txtTelMovilCDP;
    private javax.swing.JTextField txtTelParticularCDP;
    // End of variables declaration//GEN-END:variables

    private void limpiar() {
    txtApellidoMaternoCDP.setText(null);
    txtApellidoPaternoCDP.setText(null);
    txtArchivoCDP.setText(null);
    txtCalleAvenidaCDP.setText(null);
    txtComunaCDP.setText(null);
    txtDeptoCDP.setText(null);
    txtDescripcion.setText(null);
    txtFechNac.setText(null);
    txtMontoInicial.setText(null);
    txtNombreCDP.setText(null);
    txtNumCDP.setText(null);
    txtNumeroCalleCDP.setText(null);
    txtOtroComentario.setText(null);
    txtRegionCDP.setText(null);
    txtRutBuscarCDP.setText(null);
    txtRutGaraCDP.setText(null);
    txtSexo.setText(null);
    txtTelMovilCDP.setText(null);
    txtTelParticularCDP.setText(null);
    jcFechExtCDP.setCalendar(null);
    jcFechUltCredCDP.setCalendar(null);
    jcFechUltDebCDP.setCalendar(null);
    jcFechaModCDP.setCalendar(null);
    jcUltRevalCDP.setCalendar(null);
    jcUltTasCDP.setCalendar(null);
    cmbMonedaCDP.setSelectedItem("Seleccione");
    cmbSucursalCDP.setSelectedItem("Seleccione");
    cmbTipoGtiaCDP.setSelectedItem("Seleccione");
    }
}
